#! /usr/bin/perl

my $headers = `./headers.sh`;

exit 1 if $?;

my $ngx_javascript_h = `cat ngx_javascript.h`;

$ngx_javascript_h = substr($ngx_javascript_h, 0, index($ngx_javascript_h, '/* headers */') + length('/* headers */') + 1) . $headers;

if (open F, ">", "ngx_javascript.h") {
	print F $ngx_javascript_h;
	close F;
}
